package edu.scau.mis.test.proxy;

/**
 * 顾客代理
 * 代理模式作用：在实在实际对象方法前后插入代码，不需修改实际对象
 */
public class CustomerProxy implements ICustomer{
    private ICustomer customer;
    public CustomerProxy(final ICustomer customer){
        this.customer = customer;
    }
    @Override
    public void buyHouse() {
        System.out.println("代理联系业主讨价还价");
        customer.buyHouse();
        System.out.println("代理联系业主办理过户");
    }
}
